package testes;

public class Test {
	static int width = 100;
	static int height = 50;
	static int cols = 4;
	static int rows = 5;
	static int frameSizeX = 25;
	static int frameSizeY = 10;

	public static void main(String[] args) {
		showFrame(1);
		showFrame(2);
		showFrame(3);
		showFrame(4);
		showFrame(5);
		showFrame(8);
		showFrame(9);
		showFrame(12);
		showFrame(13);
		showFrame(16);
		showFrame(17);
		showFrame(18);
		showFrame(19);
		showFrame(20);
	}
	
	public static void showFrame(int frame) {
		int startX = (((frame%cols==0)?(cols):(frame%cols))-1) * frameSizeX;
		int startY = ((frame%cols==0)?(frame/cols)-1:(frame/cols)) * frameSizeY;
		
		System.out.println("Frame ("+frame+") = ("+startX+","+startY+")");
	}
}